/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package net.andrea.girardello.controller;

import java.io.IOException;
import javax.microedition.lcdui.Image;

/**
 *
 * @author agirardello
 */
public class ImageLoader {

    public static Image getImage(String name){
            Image img = null;
            try {
                    if ( !name.startsWith("/") )
                        name = "/" + name;
                    img = Image.createImage(name);
            } catch (IOException e) {
                return null;
            }
            return img;
    }
    
}
